import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import {JVxeTypes,JVxeColumn} from '/@/components/jeecg/JVxeTable/types'
//列表数据
export const columns: BasicColumn[] = [
   {
    title: '项目组编号',
    align:"center",
    dataIndex: 'proGroupCode'
   },
   {
    title: '项目组组长姓名',
    align:"center",
    dataIndex: 'proGroupManagerName'
   },
   {
    title: '项目组组长职位编号',
    align:"center",
    dataIndex: 'proGroupManagerCode'
   },
   {
    title: '项目组其他信息',
    align:"center",
    dataIndex: 'description'
   },
   {
    title: '创建时间',
    align:"center",
    dataIndex: 'createTime'
   },
   {
    title: '修改时间',
    align:"center",
    dataIndex: 'updateTime'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '项目组编号',
    field: 'proGroupCode',
    component: 'Input',
    dynamicRules: ({model,schema}) => {
          return [
                 { required: true, message: '请输入项目组编号!'},
                 {...rules.duplicateCheckRule('project_group_table', 'pro_group_code',model,schema)[0]},
          ];
     },
  },
  {
    label: '项目组组长姓名',
    field: 'proGroupManagerName',
    component: 'Input',
  },
  {
    label: '项目组组长职位编号',
    field: 'proGroupManagerCode',
    component: 'Input',
  },
  {
    label: '项目组其他信息',
    field: 'description',
    component: 'Input',
  },
  {
    label: '创建时间',
    field: 'createTime',
    component: 'DatePicker',
    componentProps: {
       showTime:true,
       valueFormat: 'YYYY-MM-DD HH:mm:ss'
     },
  },
  {
    label: '修改时间',
    field: 'updateTime',
    component: 'DatePicker',
    componentProps: {
       showTime:true,
       valueFormat: 'YYYY-MM-DD HH:mm:ss'
     },
  },
	// TODO 主键隐藏字段，目前写死为ID
	{
	  label: '',
	  field: 'id',
	  component: 'Input',
	  show: false
	},
];
//子表单数据
//子表表格配置
